<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wickr-crypto-c: src/wickrcrypto/include/wickrcrypto/packet_meta.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">wickr-crypto-c
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_92a70b6cc7e213c660915fdf1190028f.html">wickrcrypto</a></li><li class="navelem"><a class="el" href="dir_db4377ef08cfba82f5e7141624102360.html">include</a></li><li class="navelem"><a class="el" href="dir_2adb4122f2f58e588d09641dee9865e2.html">wickrcrypto</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">packet_meta.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright © 2012-2018 Wickr Inc.  All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * This code is being released for EDUCATIONAL, ACADEMIC, AND CODE REVIEW PURPOSES</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * ONLY.  COMMERCIAL USE OF THE CODE IS EXPRESSLY PROHIBITED.  For additional details,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * please see LICENSE</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * THE CODE IS MADE AVAILABLE &quot;AS-IS&quot; AND WITHOUT ANY EXPRESS OR</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * IMPLIED GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * INFRINGEMENT OR OTHERWISE. IT IS NOT BEING PROVIDED IN TRADE BUT ON</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * A VOLUNTARY BASIS ON BEHALF OF THE AUTHOR’S PART FOR THE BENEFIT</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * OF THE LICENSEE AND IS NOT MADE AVAILABLE FOR CONSUMER USE OR ANY</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * OTHER USE OUTSIDE THE TERMS OF THIS LICENSE. ANYONE ACCESSING THE</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * CODE SHOULD HAVE THE REQUISITE EXPERTISE TO SECURE THEIR SYSTEM</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * AND DEVICES AND TO ACCESS AND USE THE CODE FOR REVIEW PURPOSES</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * ONLY. LICENSEE BEARS THE RISK OF ACCESSING AND USING THE CODE. IN</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * PARTICULAR, AUTHOR BEARS NO LIABILITY FOR ANY INTERFERENCE WITH OR</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * ADVERSE EFFECT THAT MAY OCCUR AS A RESULT OF THE LICENSEE</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * ACCESSING AND/OR USING THE CODE ON LICENSEE’S SYSTEM.</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifndef packet_meta_h</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define packet_meta_h</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;buffer.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structwickr__ephemeral__info.html">   44</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structwickr__ephemeral__info.html">wickr_ephemeral_info</a> {</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="structwickr__ephemeral__info.html#ac7936b5b7b83dd24ab6b68e8dd2dd6ba">   45</a></span>&#160;    uint64_t <a class="code" href="structwickr__ephemeral__info.html#ac7936b5b7b83dd24ab6b68e8dd2dd6ba">ttl</a>;</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="structwickr__ephemeral__info.html#a0bfb5badb8bdcfac1ace1ef2026c86ac">   46</a></span>&#160;    uint64_t <a class="code" href="structwickr__ephemeral__info.html#a0bfb5badb8bdcfac1ace1ef2026c86ac">bor</a>;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;};</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structwickr__ephemeral__info.html">wickr_ephemeral_info</a> <a class="code" href="structwickr__ephemeral__info.html">wickr_ephemeral_info_t</a>;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structwickr__packet__meta.html">   62</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structwickr__packet__meta.html">wickr_packet_meta</a> {</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structwickr__packet__meta.html#a0ef43c179038ba036fc9db17976b8b1e">   63</a></span>&#160;    <a class="code" href="structwickr__ephemeral__info.html">wickr_ephemeral_info_t</a> <a class="code" href="structwickr__packet__meta.html#a0ef43c179038ba036fc9db17976b8b1e">ephemerality_settings</a>;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="structwickr__packet__meta.html#ab160a2ecfc6146ddf2ce40fe301c8ce9">   64</a></span>&#160;    <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__packet__meta.html#ab160a2ecfc6146ddf2ce40fe301c8ce9">channel_tag</a>;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structwickr__packet__meta.html#ada659f7c31d257c76edab5db52973f6e">   65</a></span>&#160;    uint16_t <a class="code" href="structwickr__packet__meta.html#ada659f7c31d257c76edab5db52973f6e">content_type</a>;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;};</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structwickr__packet__meta.html">wickr_packet_meta</a> <a class="code" href="structwickr__packet__meta.html">wickr_packet_meta_t</a>;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<a class="code" href="structwickr__packet__meta.html">wickr_packet_meta_t</a> *<a class="code" href="group__wickr__packet__meta.html#ga146144d74da12c1fff766462fe7fa661">wickr_packet_meta_create</a>(<a class="code" href="structwickr__ephemeral__info.html">wickr_ephemeral_info_t</a> <a class="code" href="structwickr__packet__meta.html#a0ef43c179038ba036fc9db17976b8b1e">ephemerality_settings</a>,</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                                              <a class="code" href="structwickr__buffer.html">wickr_buffer_t</a> *<a class="code" href="structwickr__packet__meta.html#ab160a2ecfc6146ddf2ce40fe301c8ce9">channel_tag</a>,</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                                              uint16_t <a class="code" href="structwickr__packet__meta.html#ada659f7c31d257c76edab5db52973f6e">content_type</a>);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<a class="code" href="structwickr__packet__meta.html">wickr_packet_meta_t</a> *<a class="code" href="group__wickr__packet__meta.html#ga1bb5a0f2a49069679b174b3e6521fe9b">wickr_packet_meta_copy</a>(<span class="keyword">const</span> <a class="code" href="structwickr__packet__meta.html">wickr_packet_meta_t</a> *source);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__wickr__packet__meta.html#gad165ad670da761478cf5f8f91223c1d3">wickr_packet_meta_destroy</a>(<a class="code" href="structwickr__packet__meta.html">wickr_packet_meta_t</a> **meta);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    </div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* packet_meta_h */</span><span class="preprocessor"></span></div><div class="ttc" id="structwickr__ephemeral__info_html_a0bfb5badb8bdcfac1ace1ef2026c86ac"><div class="ttname"><a href="structwickr__ephemeral__info.html#a0bfb5badb8bdcfac1ace1ef2026c86ac">wickr_ephemeral_info::bor</a></div><div class="ttdeci">uint64_t bor</div><div class="ttdef"><b>Definition:</b> packet_meta.h:46</div></div>
<div class="ttc" id="structwickr__ephemeral__info_html_ac7936b5b7b83dd24ab6b68e8dd2dd6ba"><div class="ttname"><a href="structwickr__ephemeral__info.html#ac7936b5b7b83dd24ab6b68e8dd2dd6ba">wickr_ephemeral_info::ttl</a></div><div class="ttdeci">uint64_t ttl</div><div class="ttdef"><b>Definition:</b> packet_meta.h:45</div></div>
<div class="ttc" id="structwickr__buffer_html"><div class="ttname"><a href="structwickr__buffer.html">wickr_buffer</a></div><div class="ttdoc">Represents an array of bytes and the length of the allocation associated with those bytes.</div><div class="ttdef"><b>Definition:</b> buffer.h:51</div></div>
<div class="ttc" id="structwickr__ephemeral__info_html"><div class="ttname"><a href="structwickr__ephemeral__info.html">wickr_ephemeral_info</a></div><div class="ttdoc">Message destruction control metadata.</div><div class="ttdef"><b>Definition:</b> packet_meta.h:44</div></div>
<div class="ttc" id="group__wickr__packet__meta_html_ga146144d74da12c1fff766462fe7fa661"><div class="ttname"><a href="group__wickr__packet__meta.html#ga146144d74da12c1fff766462fe7fa661">wickr_packet_meta_create</a></div><div class="ttdeci">wickr_packet_meta_t * wickr_packet_meta_create(wickr_ephemeral_info_t ephemerality_settings, wickr_buffer_t *channel_tag, uint16_t content_type)</div></div>
<div class="ttc" id="structwickr__packet__meta_html_a0ef43c179038ba036fc9db17976b8b1e"><div class="ttname"><a href="structwickr__packet__meta.html#a0ef43c179038ba036fc9db17976b8b1e">wickr_packet_meta::ephemerality_settings</a></div><div class="ttdeci">wickr_ephemeral_info_t ephemerality_settings</div><div class="ttdef"><b>Definition:</b> packet_meta.h:63</div></div>
<div class="ttc" id="group__wickr__packet__meta_html_gad165ad670da761478cf5f8f91223c1d3"><div class="ttname"><a href="group__wickr__packet__meta.html#gad165ad670da761478cf5f8f91223c1d3">wickr_packet_meta_destroy</a></div><div class="ttdeci">void wickr_packet_meta_destroy(wickr_packet_meta_t **meta)</div></div>
<div class="ttc" id="structwickr__packet__meta_html_ab160a2ecfc6146ddf2ce40fe301c8ce9"><div class="ttname"><a href="structwickr__packet__meta.html#ab160a2ecfc6146ddf2ce40fe301c8ce9">wickr_packet_meta::channel_tag</a></div><div class="ttdeci">wickr_buffer_t * channel_tag</div><div class="ttdef"><b>Definition:</b> packet_meta.h:64</div></div>
<div class="ttc" id="group__wickr__packet__meta_html_ga1bb5a0f2a49069679b174b3e6521fe9b"><div class="ttname"><a href="group__wickr__packet__meta.html#ga1bb5a0f2a49069679b174b3e6521fe9b">wickr_packet_meta_copy</a></div><div class="ttdeci">wickr_packet_meta_t * wickr_packet_meta_copy(const wickr_packet_meta_t *source)</div></div>
<div class="ttc" id="structwickr__packet__meta_html"><div class="ttname"><a href="structwickr__packet__meta.html">wickr_packet_meta</a></div><div class="ttdoc">control metadata found in the encrypted payload of a packet</div><div class="ttdef"><b>Definition:</b> packet_meta.h:62</div></div>
<div class="ttc" id="structwickr__packet__meta_html_ada659f7c31d257c76edab5db52973f6e"><div class="ttname"><a href="structwickr__packet__meta.html#ada659f7c31d257c76edab5db52973f6e">wickr_packet_meta::content_type</a></div><div class="ttdeci">uint16_t content_type</div><div class="ttdef"><b>Definition:</b> packet_meta.h:65</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
